/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author kenny
 */
@Embeddable
public class ClasexperiodoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nDcnClsId")
    private int nDcnClsId;
    @Basic(optional = false)
    @Column(name = "nPrdId")
    private int nPrdId;

    public ClasexperiodoPK() {
    }

    public ClasexperiodoPK(int nDcnClsId, int nPrdId) {
        this.nDcnClsId = nDcnClsId;
        this.nPrdId = nPrdId;
    }

    public int getNDcnClsId() {
        return nDcnClsId;
    }

    public void setNDcnClsId(int nDcnClsId) {
        this.nDcnClsId = nDcnClsId;
    }

    public int getNPrdId() {
        return nPrdId;
    }

    public void setNPrdId(int nPrdId) {
        this.nPrdId = nPrdId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nDcnClsId;
        hash += (int) nPrdId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClasexperiodoPK)) {
            return false;
        }
        ClasexperiodoPK other = (ClasexperiodoPK) object;
        if (this.nDcnClsId != other.nDcnClsId) {
            return false;
        }
        if (this.nPrdId != other.nPrdId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.ClasexperiodoPK[ nDcnClsId=" + nDcnClsId + ", nPrdId=" + nPrdId + " ]";
    }
    
}
